#include "citymap.h"

#include <stdlib.h>

#include "global.h"
#include "palette.h"

Citymap* new_citymap()
{
	int x, y;

	Citymap* citymap = malloc(sizeof(Citymap));
	citymap->sf = SDL_CreateRGBSurface(SDL_SWSURFACE, 1000, 1000, 8, 0, 0, 0, 0);
	setup_palette(citymap->sf);
	for(x=0; x<1000; x+=8)
		for(y=0; y<1000; y+=8)
			SET_PX(citymap->sf, x, y, 8);
	return citymap;
}


void free_citymap(Citymap* citymap)
{
	SDL_FreeSurface(citymap->sf);
	free(citymap);
}
